package plantsVSzombies;

public class PlantsBigPea extends Plants implements BecomeBigInterface {

	private int hp;
	private int atk;
	private boolean becomebig = true;

	public PlantsBigPea() {
		super();
		this.hp = 300;
		this.atk = 20;
		System.out.println("生命值：" + this.hp + " 攻击力：" + this.atk);
	}

	public int getHp() {
		return hp;
	}

	public void setHp(int hp) {
		if (hp < 50 && this.becomebig) {
			hp = becomeBig(hp);
			this.becomebig = false;
		}
		this.hp = hp;
	}

	public int getAtk() {
		return atk;
	}

	public void setAtk(int atk) {
		this.atk = atk;
	}

	public String getName() {
		return "豌豆射手";
	}

	public int becomeBig(int hp) {
		hp = hp + 200;
		System.out.println();
		System.out.print("!!!"+this.getName() + "变大了，生命值加200");
		return hp;
	}

}
